﻿CREATE TABLE [dbo].[DayTypes] (
    [InstitutionEntityID] INT            CONSTRAINT [DF_DayTypes_EntityID] DEFAULT ((0)) NOT NULL,
    [DayTypeName]         NVARCHAR (100) NOT NULL,
    CONSTRAINT [PK_DayTypes] PRIMARY KEY CLUSTERED ([InstitutionEntityID] ASC, [DayTypeName] ASC),
    CONSTRAINT [FK_DayTypes_Entity] FOREIGN KEY ([InstitutionEntityID]) REFERENCES [dbo].[Entities] ([EntityID])
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'can be 0 to be default; otherwise institution EntityID', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'DayTypes';

